projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4df033
)
(pushnew): Rework 2006-09-10 change. Use memql
author
Kim F. Storm
<storm@cua.dk>
Wed, 20 Sep 2006 23:12:15 +0000
(23:12 +0000)
committer
Kim F. Storm
<storm@cua.dk>
Wed, 20 Sep 2006 23:12:15 +0000
(23:12 +0000)
instead of add-to-list in the simple case.
lisp/emacs-lisp/cl.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/cl.el
b/lisp/emacs-lisp/cl.el
index 53bec05ddc373a9e8f4cb39aa3dcc287481daa59..3399f7e7b20d4d826673c3213110b53fa863e705 100644
(file)
--- a/
lisp/emacs-lisp/cl.el
+++ b/
lisp/emacs-lisp/cl.el
@@
-159,9
+159,7
@@
an element already on the list.
\n(fn X PLACE [KEYWORD VALUE]...)"
(if (symbolp place)
(if (null keys)
- `(let ((pushnew-internal ,place))
- (add-to-list 'pushnew-internal ,x nil 'eql)
- (setq ,place pushnew-internal))
+ `(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place)))
(list 'setq place (list* 'adjoin x place keys)))
(list* 'callf2 'adjoin x place keys)))